
<html>
<head>
  <title>Relative Locators</title>
  <style>
    table {
      text-align: center;
      border: solid;
    }
    td {
      border: solid;
    }
    .small-rectangle {
      border: 1px solid black;
      width: 100px;
      height: 50px;
      margin: 5px 25px;
    }
    .big-rectangle {
      border: 1px solid black;
      width: 150px;
      height: 400px;                
    }
  </style>
</head>
<body>
<h1>Relative Locator Tests</h1>
<p id="above">This text is above.
<p id="mid">This is a paragraph of text in the middle.
<p id="below">This text is below.


<table>
  <tr>
    <td id="first">1</td>
    <td id="second" style="width: 100px">2</td>
    <td id="third">3</td>
  </tr>
  <tr>
    <td id="fourth">4</td>
    <td id="center">5</td>
    <td id="sixth">6</td>
  </tr>
  <tr>
    <td id="seventh">7</td>
    <td id="eighth">8</td>
    <td id="ninth">9</td>
  </tr>
</table>

<div class="small-rectangle" id="rect1">
  Rectangle 1
</div>
<div class="big-rectangle" id="rect2">
  Rectangle 2, which is near Rectangle 1
</div>

<div class="small-rectangle" style="margin:60px 25px" id="rect3">
  Rectangle 3
</div>
<div class="big-rectangle" id="rect4">
  Rectangle 4, which is not near Rectangle 2 because it is more than 50 px away
</div>

</body>
</html>
